import { HttpRequest } from '@/utils/request'
import type {ResponseType} from '@/interface/core/entity'
import type {LoginRequest} from './dto'
import type {LoginResponseType,BlogVO} from '@/interface/basic/vo'
// import { BasicResponseVO } from '@/interface/basic/vo'
const BasicService = {
  login: (data: Partial<LoginRequest>): Promise<LoginResponseType> => {
    const request = new HttpRequest()
    return request.post('/basicApi/user/login', data)
  },
  loginByToken: (): Promise<LoginResponseType> => {
    const request = new HttpRequest()
    return request.get('/basicApi/user/loginByToken', {})
  },
  getBlogList: (): Promise<ResponseType<BlogVO>> => {
    const request = new HttpRequest()
    return request.get('/searchApi/blog/recommend', {})
  }
}
export default BasicService
